package com.yanqu.road.server.cmd.activity.soulbone;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.SoulBoneProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.server.manager.activity.soulbone.CrossSoulBoneMgr;
import com.yanqu.road.server.protocol.Protocol;
import com.yanqu.road.utils.YanQuMessageUtils;

@Cmd(code = Protocol.C_SOUL_BONE_NOTICE, desc = "公告列表")
public class CrossSoulBoneNoticeCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        SoulBoneProto.CrossSoulBoneNoticeReqMsg reqMsg = SoulBoneProto.CrossSoulBoneNoticeReqMsg.parseFrom(packet.getBytes());

        MessageHelper.sendPacket(serverId, packet.getPlayerId(), YanQuMessageUtils.buildMessage(Protocol.U_SOUL_BONE_NOTICE_LIST,
                CrossSoulBoneMgr.getNoticeList(reqMsg.getActivityId())));
    }

    @Override
    public void sendData() {

    }
}
